1. Field of the Invention
The present invention relates to server virtualization. More particularly, the present invention relates to a method and apparatus for dynamically determining connection establishment mechanisms between virtual machines (VMs) in a virtual environment based on the relative locations thereof.
2. Description of Related Art
Due to the low usage of server resources and the resultant necessity of server consolidation, and the increasing performance improvement of individual servers after the emergence of multi-core processors, server virtualization techniques are attracting more and more attention of venders. Through allocating various physical resources among multiple VMs, server virtualization can run different applications, or even different Operating Systems (OSs), on single enterprise server simultaneously. Each VM, appearing as a stand alone server, runs in the same physical server in fact. Executing multiple applications on a single server can improve the usage of the server while reducing the number of servers to be managed and maintained. As application requirements increase, it is convenient to create additional VMs rapidly in response to the varying requirements without the trouble of deploying other physical machines.
Recently, server virtualization has become a hot topic in system research and solution area. One aspect of server virtualization is to virtualize a number of distributed physical servers (hereinafter called “physical hosts”) into a large logical server. Further, with server virtualization techniques, it is possible for IT administrators to move a running VM among physical machines while keeping the VM continuously available. One important feature of server virtualization is live migration, which means the migration of a VM from one physical host to another one under “power-on” condition. Live migration can reduce the down time to an unperceivable level, such as several milliseconds, and therefore have no significant affect on end users, enabling the administrator to carry out various tasks on physical servers, such as offline maintenance, update, configuration, load balance and management.
FIG. 1 schematically shows a VM that is migrated from one physical host, physical host 1, to another one, physical host 2, in a virtual environment including a number of physical servers connected together via a Local Area Network (LAN). FIG. 1 is merely an illustrative example, and those skilled in the art can understand the number of the physical servers in the LAN and the number of VMs deployed on each physical server can be adjusted according to specific requirement.
Generally, some applications on a VM need to communicate with certain applications on other VMs by high performance private channel, e.g., Intrusion Detection System (IDS) and firewall applications, firewall and Virtual Private Network (VPN) applications. In a common situation, several VMs are connected with each other by Ethernet and the inter-communication traffic between the different applications must go through a TCP/IP stack. When different applications are consolidated together to one physical host, there is an opportunity to optimize the performance of the private channel. Specifically, the private channel can be built without checksum, in order delivery, congestion control and payload encapsulation of the Transmission Control Protocol/Internet Protocol (TCP/IP) stack because all of the traffic is moved just in the Random Access Memory (RAM). Thus, the performance of the private channel can be boosted a lot with a thin protocol layer (hereinafter, called “light weight protocol”) which omits the large part of overhead leaded by the TCP/IP stack. Herein, light weight protocol is a general term of a kind of method for communication on a same physical host with less system overhead and/or the implementations thereof.
FIG. 2 is a schematic diagram of a system in the prior art, in which two VMs communicate with each other through a TCP/IP stack. In FIG. 2, no matter whether the VMs are on the same physical host, in order to transmit messages between them, a connection must be established between the VMs by using the well known TCP/IP protocol in the art. A main advantage of the method for establishing a channel between VMs by TCP/IP protocol is the best flexibility achieved. Even if a VM migration occurs after the connection establishment, the connection between two VMs is not interrupted. In addition, as a popular protocol adopted in the existing computer networks, it is not necessary to make any modification to the TCP/IP protocol stack for VMs, therefore, a great compatibility with other existing applications can be obtained. On the other hand, the method for establishing a channel between VMs by TCP/IP protocol has the following drawback: when the VMs are on the same physical host, using TCP/IP protocol may bring about unnecessary system overhead, because all traffic occur between different VMs are merely in the RAM, so that the checksum protection, in order delivery, congestion control and payload encapsulation provided for in the TCP/IP protocol are useless in nature.
FIG. 3 schematically shows a system in the prior art, in which two VMs on the same physical host communicate with each other through a light weight protocol, such as shared memory or other light weight protocols implemented by firmware. Using a light weight protocol to establish a channel between two VMs has the advantage of the best system performance, that is, lower system overhead, faster processing speed and fewer physical resources occupied. However, it has a shortcoming of the lack of connection flexibility, because the connection established by light weight protocol between two VMs will interrupt when a migration occurs to any one of VMs, which arising from the intrinsic characters of the light weight protocols.
For example, the paper by Wei Huang, et al, Proceedings of the 2007 ACM/IEEE Conference on Supercomputing, Nov. 10-16, 2007, titled “Virtual Machine Aware Communication Libraries for High Performance Computing” discloses how to establish efficient communications when two VMs are on the same physical host. Particularly, a virtual machine aware communication library is purposed to support the high efficient shared memory communication between computing processings on the same physical host. The paper does not address the problem of how to handle VM migrations that occur after the connection establishment, and therefore, it does not overcome the shortcoming of the existing light weight protocols.
It is highly desirable to provide a method, apparatus and system for dynamically determining the connection establishment mechanism between VMs based on the locations thereof.